package com.dymall.payment.enums;

import lombok.Getter;

@Getter
public enum PayStatus {
    PAY_Pending(0, "待支付"),  // 订单创建后
    PAY_Cancelled(1, "支付取消"),   // 用户自己取消或超时自动取消
    PAY_SUCCESS(2, "支付成功"), // 扣减余额后
    ;
    private final int value;
    private final String desc;

    PayStatus(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public boolean equalsValue(Integer value){
        if (value == null) {
            return false;
        }
        return getValue() == value;
    }
}